{include file="public_tpl/head"/}
<title>管理员管理 - 权限节点列表 - {$cfg_website}</title>
<meta name="keywords" content="{$cfg_keywords?:''}">
<meta name="description" content="{$cfg_description?:''}">
</head>
<body>
<!--面包屑-->
<nav class="breadcrumb">
    <i class="Hui-iconfont">&#xe67f;</i> 首页
    <span class="c-gray en">&gt;</span> 管理员管理
    <span class="c-gray en">&gt;</span> 权限节点列表
    <a class="btn btn-success radius r" style="line-height:1.6em;margin-top:3px"
       href="javascript:location.replace(location.href);" title="刷新">
        <i class="Hui-iconfont">&#xe68f;</i>
    </a>
</nav>
<!--/面包屑-->

<div class="page-container">

    <div class="cl pd-5 bg-1 bk-gray mt-20">
        <span class="l">
            <a href="{:url('add',['pid'=>0])}" class="btn btn-primary">
                <i class="Hui-iconfont">&#xe600;</i> 添加根节点
            </a>
        </span>
    </div>

    <table class="table table-border table-bg">
        <form id="f-table-form" method="post">
        <thead>
        <tr>
            <th>ID</th>
            <th>父节点</th>
            <th>名称</th>
            <th>规则</th>
            <th>状态</th>
            <th>显示</th>
            <th>排序</th>
            <th>操作</th>
        </tr>
        </thead>
        <tbody>
        {volist name="list" id="item"}
        <tr>
            <th>{$item.id}</th>
            <td>{$item.pid_name}</td>
            <td>{$item.level|t_indent_by_level}{$item.name}</td>
            <td>{$item.rule}</td>
            <td>{$item.status}</td>
            <td>{$item.is_show}</td>
            <td>{$item.list_order}</td>
            <td>
                <a class="btn btn-primary" href="{:url('edit',['id'=>$item['id']])}">编辑</a>
                <a class="btn btn-danger" href="{:url('delete',['id'=>$item['id']])}">删除</a>
                <a class="btn btn-secondary" href="{:url('switchStatus',['id'=>$item['id'],'status'=>$item['status_data']-1])}">禁用开关</a>
                {neq name="$item.level" value="4"}<a class="btn btn-primary" href="{:url('add',['pid'=>$item['id'],'level'=>$item['level']])}">添加子节点</a>{/neq}
            </td>
        </tr>
        {/volist}
        </tbody>
        </form>
    </table>
</div>

{include file="public_tpl/script"/}
</body>
</html>